Global Index
HTML5 JS API Index > Canvas Tutorials & Specs

ImageData

Properties
Uint8ClampedArray
data
New ImageData objects must be initialized so that their width attribute is set to the number of pixels per row in the image data, their height attribute is set to the number of rows in the image data, and their data attribute, except where an existing array is provided, is initialized to a new Uint8ClampedArray object.
unsigned long
height
The height attribute, on getting, must return the height of the rendering context's scratch bitmap, in CSS pixels. On setting, it must set bitmap dimensions to the current width of the rendering context's scratch bitmap in CSS pixels and the new value, respectively.
unsigned long
width
The width attribute, on getting, must return the width of the rendering context's scratch bitmap, in CSS pixels. On setting, it must set bitmap dimensions to the new value and the current height of the rendering context's scratch bitmap in CSS pixels, respectively.
Constructor
ImageData(unsigned long sw, unsigned long sh)
ImageData(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh)
Referenced by
CanvasRenderingContext2DputImageData(...)
ImageBitmapFactoriescreateImageBitmap(...)